package com.doom.a3rdlibdemo.decorator;

public class PizzaB extends Decorator {

    Pizza pizza;

    public PizzaB(Pizza pizza){
        this.pizza = pizza;
    }

    @Override
    public double getPrice(){
        return pizza.getPrice() + 10;
    }

    @Override
    public String getName(){
        return pizza.getName() + "+洋葱";
    }
}
